/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sopraim.entity;

import java.sql.Timestamp;


/**
 *
 * @author JulieDu
 */
public class TextMessage implements Comparable<TextMessage>{
   
    private long id ; 
    private Timestamp date  ;

   
    private String message ; 

    private User sender ; 

    public User getSender() {
        return sender;
    }

    public void setSender(User sender) {
        this.sender = sender;
    }
    
    
    
    public TextMessage() {
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String Message) {
        this.message = Message;
    }
     public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

   public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    @Override
    public int compareTo(TextMessage o) {
       return this.getDate().compareTo(o.getDate());
    }
    
    
    
    
    
    
}
